<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>共克时艰，我们在一起</title>
    <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="full-screen" content="true" />
    <meta name="screen-orientation" content="portrait" />
    <meta name="x5-fullscreen" content="true" />
    <meta name="360-fullscreen" content="true" />
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <style>
        html, body {
            -ms-touch-action: none;
            background: url(https://miva-unmcc.oss-cn-beijing.aliyuncs.com/LZ_OLG/bg_main.png) no-repeat ;
            background-size: cover;
            padding: 0;
            border: 0;
            margin: 0;
            height: 100%;
        }
        #divImage {
            width: 100vw;
            height: 100vh;
            position: fixed;
            /* width: calc(85% + 5px); */            
            /* top: calc(4% + 10px); */
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            z-index: 7;
            box-sizing: border-box;
            text-align: center;
            background: #000
        }

        #shareImage {
            /* width: 100%; */
            height: 100%;
            pointer-events: initial;
        }
        #divImage::after{
            content: '';
            display: block;
            background-image: url(http://miva-unmcc.oss-cn-beijing.aliyuncs.com/LZ_OLG/item_tip_save.png);
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            z-index: 999;
            width: 180px;
            height: 76px;
            background-size: contain;
            background-repeat: no-repeat;
            animation: miva-show 1s 3s forwards;
            pointer-events: none;
        }
        @keyframes miva-show {
            0%{opacity: 1}
            100%{opacity: 0}
        }
        #mask{
            width: 100vw;
            height: 100vh;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            background: rgba(0, 0, 0, .5);
        }
        #mask span {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%); 
            font-size: 12px;
            color: #fff;
        }
    </style>
</head>

<body>
    <div id="mask"><span>进入中请稍候</span></div>
    <div id="nickname" style="display: none">九条米法</div>
    <div id="avatar" style="display: none">https://thirdqq.qlogo.cn/qqapp/1104455702/4AFC34E4A90E0BB5B52FE0E374B6E249/100?imageView2/1/w/80/h/80</div>
    <div id="divImage" style="display: none">
        <img id="shareImage" src="" alt="">
    </div>

    <!--<script>
        var href = window.location.href;
        var indexStr = "?code=";
        var endStr = "&state";
        var indexNum = href.indexOf(indexStr);
        var endNum = href.indexOf(endStr);
        var code = href.slice(indexNum + indexStr.length, endNum) || false;

        getUserInfo_miva()

        function getUserInfo_miva() {
            $.post('http://www.unmcc.com/unmcc/testKujoMiva.php?type=1&code=' + code)
                .then(res => {
                    res = JSON.parse(res);
                    if (res.errcode) {
                        alert('获取用户信息失败, 请重新进入')
                        window.location.href = "http://www.unmcc.com/unmcc/miva/LZ_OLG" + "?" + Math.random();
                        return;
                    }
                    getUserInfo(res);
                })
            function getUserInfo(res_1) {
                $.get(`http://www.unmcc.com/unmcc/testKujoMiva.php?type=2&access_token=${res_1.access_token}&openid=${res_1.openid}`)
                    .then(function (res) {
                        res = JSON.parse(res);
                        // $("#nickname").html(encodeURI(res.nickname));
                        $("#nickname").html(res.nickname);
                        $("#avatar").html(res.headimgurl);
                    })
            }
        }
    </script>-->

        
    <div style="margin: auto;width: 100%;height: 100%;" class="egret-player"
            data-entry-class="Main"
            data-orientation="portrait"
            data-scale-mode="showAll"
            data-frame-rate="60"
            data-content-width="640"
            data-content-height="1136"
            data-multi-fingered="2"
            data-show-fps="false" data-show-log="false"
            data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
    </div>

    <script>
        var loadScript = function (list, callback) {
            var loaded = 0;
            var loadNext = function () {
                loadSingleScript(list[loaded], function () {
                    loaded++;
                    if (loaded >= list.length) {
                        callback();
                    }
                    else {
                        loadNext();
                    }
                })
            };
            loadNext();
        };

        var loadSingleScript = function (src, callback) {
            var s = document.createElement('script');
            s.async = false;
            s.src = src;
            s.addEventListener('load', function () {
                s.parentNode.removeChild(s);
                s.removeEventListener('load', arguments.callee, false);
                callback();
            }, false);
            document.body.appendChild(s);
        };

        var xhr = new XMLHttpRequest();
        xhr.open('GET', './manifest.json?v=' + Math.random(), true);
        xhr.addEventListener("load", function () {
            var manifest = JSON.parse(xhr.response);
            var list = manifest.initial.concat(manifest.game);
            loadScript(list, function () {
                /**
                 * {
                 * "renderMode":, //Engine rendering mode, "canvas" or "webgl"
                 * "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
                 * "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
                 * "calculateCanvasScaleFactor": //a function return canvas scale factor
                 * }
                 **/
                egret.runEgret({
                    renderMode: "webgl", audioType: 0, calculateCanvasScaleFactor: function (context) {
                        var backingStore = context.backingStorePixelRatio ||
                            context.webkitBackingStorePixelRatio ||
                            context.mozBackingStorePixelRatio ||
                            context.msBackingStorePixelRatio ||
                            context.oBackingStorePixelRatio ||
                            context.backingStorePixelRatio || 1;
                        return (window.devicePixelRatio || 1) / backingStore;
                    }
                });
            });
        });
        xhr.send(null);
    </script>
</body>

</html>